package com.cash.channel.svc.service.api;

import com.cash.channel.svc.service.base.LoanStatus;
import com.cash.channel.svc.util.ServiceUtils;
import com.cash.channel.api.constant.Constant;
import com.cash.channel.api.exception.CashChannelException;
import com.cash.channel.api.model.ApiRequestModel;
import com.cash.channel.api.model.ApiResponseModel;
import com.cash.channel.api.model.response.LoanStatusResponse;
import com.cash.channel.api.service.BaseApi;
import org.springframework.stereotype.Service;

@Service("loanStatus")
public class CJH000013 implements BaseApi<LoanStatusResponse> {

    @Override
    public ApiResponseModel<LoanStatusResponse> doProcess(ApiRequestModel apiRequestModel) throws CashChannelException {
        LoanStatus loanStatus = ServiceUtils.getBean(apiRequestModel.getInterfaceType()+ Constant.SERVICE.查询放款结果, LoanStatus.class);
        return loanStatus.doLoanStatus(apiRequestModel);
    }

}
